<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<title>${lotter.name } - ${keyChinese }</title>
		<%@include file="/WEB-INF/base.jspf"%>
		<link rel="stylesheet" href="/css/style.css" />
		<style type="text/css">
			.bx .btn2{color:blue;background: url("/img/caizhong/bg/qiu1.png");background-size: 100% 100%;border: 0;font-weight:bold;width: 80px;}
			.bx .act{color:white;background: url("/img/caizhong/bg/qiu2.png");background-size: 100% 100%;border: 0;font-weight:bold;width: 80px;}
			
			
			.table1 tr td{height: 37px;padding:0 5px;color: white;font-size: 14px;}
			.wanfa img{height: 90px;margin:6px;width: 70px; border-radius: 8px;}
			.wanfa .bx div{margin-bottom: 30px;}
			.wanfa .bx img{height: 63px;margin:3px;width: 50px; border-radius: 8px;margin-top: -5px;}
			.wanfa .bx button{line-height: 60px;}
			
			.wanfa .sz img,.wanfa .bz img{border: 1px solid silver;margin: 0px;height: 60px;width: 48px;}
			.wanfa .sz td,.wanfa .bz td{height: 70px;padding: 0px;width: 28%;}
			.sz .td,.bz .td{border: 3px solid silver;}
			.sz .act,.bz .act{border: 3px solid red;}
			
			.rx .img{border: 5px solid green;}
			.rx .act{border: 5px solid red;}
			.th .img{border: 5px solid green;}
			.th .act{border: 5px solid red;}
			.eg{color: silver;font-size: 20px;}
			
		</style>
	</head>
	<body style="background: #4F84CF;height: 100%">
		<span id="id" class="hidden">${lotter.id }</span>
		<span id="orderid" class="hidden"></span>
		<span id="cname" class="hidden">${lotter.cname }</span>
		<span id="lasttime" class="lasttime hidden">${lotter.lottertime }</span>
		<span id="cplay1" class="hidden">${keyChinese }</span>
		<span id="cname1" class="hidden">${lotter.name }</span>
		<span id="cplay" class="hidden">${key}</span>
		<div class="col-xs-12 col-sm-4 col-sm-offset-4" style="position: fixed;top: 0;height: 150px;z-index: 5;padding: 0px;background: #264F8C;">
			<img alt="" src="/img/caizhong/bg/bg.png" width="100%" height="150px;"/>
		</div>
		<div class="col-xs-12 col-sm-4 col-sm-offset-4" style="padding: 10px 20px;position: fixed;top: 0;height: 150px;z-index: 10;">
			<div class="row">
				<div style="color: white;font-weight: bold;font-size: 20px;text-align: center;">${lotter.name } <span class='font12	'>${keyChinese }</span></div>
			
				<a onclick="back()" class="glyphicon glyphicon-chevron-left fl" style="color: white;margin-top: -30px;"></a>
				<a onclick="help('${lotter.helpurl}','${lotter.name }')" style="color: white;margin-top: -30px;" class="fr">购彩助手</a>
			</div>
			<img class="fr" alt="" src="/img/caizhong/${lotter.cname }.png" height="70px" width="70px" style="right: 10px;position: fixed;top: 40px;">
			<table class="row table1">
				<tr>
					<td>
						距 ${lotter.period+1 } 开奖 <span id="djs" style="font-size: 14px;font-weight: bold;color: yellow;"></span>
					</td>
				</tr>
				<tr>
					<td>
						第 <span style="font-size: 14px;" class="period">${lotter.period }</span> 期（上期）：
					</td>
				</tr>
				<tr>
					<td>
						<span class="lotternumber">${lotter.lotternumber }</span>
					</td>
				</tr>
			</table>
		</div>
		<div class="col-xs-12 col-sm-4 col-sm-offset-4 wanfa" style="padding: 10px;text-align: center;margin-top: 172px;">
			<c:choose>
				<c:when test="${key=='dz' }">
					<div class="bz">
						<table style="width: 100%;text-align: center;border-collapse:separate;border-spacing:5px 20px;">
							<tr>
								<td class="td" text="1">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/a.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/img/caizhong/puke/zhi/a.png">
								</td>
								<td class="td" text="2">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/2.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/img/caizhong/puke/zhi/2.png">
								</td>
								<td class="td" text="3">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/3.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/img/caizhong/puke/zhi/3.png">
								</td>
							</tr>
							<tr>
								<td class="td" text="4">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/4.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/>img/caizhong/puke/zhi/4.png">
								</td>
								<td class="td" text="5">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/5.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/img/caizhong/puke/zhi/5.png">
								</td>
								<td class="td" text="6">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/6.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/img/caizhong/puke/zhi/6.png">
								</td>
							</tr>
							<tr>
								<td class="td" text="7">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/7.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/img/caizhong/puke/zhi/7.png">
								</td>
								<td class="td" text="8">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/8.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/img/caizhong/puke/zhi/8.png">
								</td>
								<td class="td" text="9">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/9.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/img/caizhong/puke/zhi/9.png">
								</td>
							</tr>
							<tr>
								<td class="td" text="10">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/10.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/img/caizhong/puke/zhi/10.png">
								</td>
								<td class="td" text="j">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/j.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/img/caizhong/puke/zhi/j.png">
								</td>
								<td class="td" text="q">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/q.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/img/caizhong/puke/zhi/q.png">
								</td>
							</tr>
							<tr>
								<td class="td" text="k">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/k.png">
									<img alt="" class="img" style="margin-left: -25px;" src="/img/caizhong/puke/zhi/k.png">
								</td>
							</tr>
						</table>
						<input class='hidden' id='temp1'/>
					</div>
				</c:when>
				<c:when test="${key=='bz' }">
					<div class="bz">
						<table border="0" style="width: 100%;text-align: center;border-collapse:separate;border-spacing:5px 20px;">
							<tr>
								<td class="td" text="1">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/a.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/a.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/a.png">
								</td>
								<td class="td" text="2">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/2.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/>img/caizhong/puke/zhi/2.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/>img/caizhong/puke/zhi/2.png">
								</td>
								<td class="td" text="3">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/3.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/3.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/3.png">
								</td>
							</tr>
							<tr>
								<td class="td" text="4">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/4.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/4.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/4.png">
								</td>
								<td class="td" text="5">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/5.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/5.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/5.png">
								</td>
								<td class="td" text="6">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/6.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/6.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/6.png">
								</td>
							</tr>
							<tr>
								<td class="td" text="7">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/7.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/7.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/7.png">
								</td>
								<td class="td" text="8">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/8.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/8.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/8.png">
								</td>
								<td class="td" text="9">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/9.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/9.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/9.png">
								</td>
							</tr>
							<tr>
								<td class="td" text="10">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/10.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/10.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/10.png">
								</td>
								<td class="td" text="j">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/j.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/j.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/j.png">
								</td>
								<td class="td" text="q">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/q.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/q.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/q.png">
								</td>
							</tr>
							<tr>
								<td class="td" text="k">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/k.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/k.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/k.png">
								</td>
							</tr>
						</table>
						<input class='hidden' id='temp1'/>
					</div>
				</c:when>
				<c:when test="${key=='sz' }">
					<div class="sz">
						<table border="0" style="width: 100%;text-align: center;border-collapse:separate;border-spacing:5px 20px;">
							<tr>
								<td class="td" text="a23">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/a.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/2.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/3.png">
								</td>
								<td class="td" text="234">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/2.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/3.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/4.png">
								</td>
								<td class="td" text="345">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/3.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/4.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/5.png">
								</td>
							</tr>
							<tr>
								<td class="td" text="456">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/4.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/5.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/6.png">
								</td>
								<td class="td" text="567">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/5.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/6.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/7.png">
								</td>
								<td class="td" text="678">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/6.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/7.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/8.png">
								</td>
							</tr>
							<tr>
								<td class="td" text="789">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/7.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/8.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/9.png">
								</td>
								<td class="td" text="8910">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/8.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/9.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/10.png">
								</td>
								<td class="td" text="910j">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/9.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/10.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/j.png">
								</td>
							</tr>
							<tr>
								<td class="td" text="10jq">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/10.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/j.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/q.png">
								</td>
								<td class="td" text="jqk">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/j.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/q.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/k.png">
								</td>
								<td class="td" text="qka">
									<img alt="" class="img" src="/img/caizhong/puke/zhi/q.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/k.png">
									<img alt="" class="img" style="margin-left: -35px;" src="/img/caizhong/puke/zhi/a.png">
								</td>
							</tr>
						</table>
						<input class='hidden' id='temp1'  />
					</div>
				</c:when>
				<c:when test="${key=='ths' }">
					<div class="th">
						<img alt="" class="img" text="黑桃" src="/img/caizhong/puke/sz/heitsz.png">
						<img alt="" class="img" text="方片" src="/img/caizhong/puke/sz/fangpsz.png">
						<img alt="" class="img" text="梅花" src="/img/caizhong/puke/sz/meihsz.png">
						<img alt="" class="img" text="红桃" src="/img/caizhong/puke/sz/hongtsz.png">
						<input class='hidden' id='temp1'  />
					</div>
				</c:when>
				<c:when test="${key=='th' }">
					<div class="th">
						<img alt="" class="img" text="黑桃" src="/img/caizhong/puke/huase/heit.png">
						<img alt="" class="img" text="方片" src="/img/caizhong/puke/huase/fangp.png">
						<img alt="" class="img" text="梅花" src="/img/caizhong/puke/huase/meih.png">
						<img alt="" class="img" text="红桃" src="/img/caizhong/puke/huase/hongt.png">
						<input class='hidden' id='temp1'  />
					</div>
				</c:when>
				<c:when test="${key=='bx' }">
					<div class="font-center bx">
						<div>
							<button class='btn2'>对子</button>
							<span class="eg">如</span>
							<img alt="" src="/img/caizhong/puke/tao/heita.png">
							<img alt="" src="/img/caizhong/puke/tao/hongta.png">
							<img alt="" src="/img/caizhong/puke/tao/meihj.png"><br>
						</div>
						<div>
							<button class='btn2'>豹子</button>
							<span class="eg">如</span>
							<img alt="" src="/img/caizhong/puke/tao/heita.png">
							<img alt="" src="/img/caizhong/puke/tao/hongta.png">
							<img alt="" src="/img/caizhong/puke/tao/meiha.png"><br>
						</div>
						<div>
							<button class='btn2'>同花</button>
							<span class="eg">如</span>
							<img alt="" src="/img/caizhong/puke/tao/heita.png">
							<img alt="" src="/img/caizhong/puke/tao/heitj.png">
							<img alt="" src="/img/caizhong/puke/tao/heit5.png"><br>
						</div>
						<div>
							<button class='btn2'>顺子</button>
							<span class="eg">如</span>
							<img alt="" src="/img/caizhong/puke/tao/heita.png">
							<img alt="" src="/img/caizhong/puke/tao/fangp2.png">
							<img alt="" src="/img/caizhong/puke/tao/meih3.png"><br>
						</div>
						<div>
							<button class='btn2'>同花顺</button>
							<span class="eg">如</span>
							<img alt="" src="/img/caizhong/puke/tao/hongta.png">
							<img alt="" src="/img/caizhong/puke/tao/hongt2.png">
							<img alt="" src="/img/caizhong/puke/tao/hongt3.png"><br>
						</div>
						<input class='hidden' id='temp1'  />
					</div>
				</c:when>
				<c:otherwise>
					<div class="rx">
						<script type="text/javascript">
							var str1=new Array("a","2","3","4","5","6","7","8","9","10","j","q","k");
							var str="";
							for(var i=0;i<str1.length;i++){
								str+="<img class='img' text='"+str1[i]+"' src='/img/caizhong/puke/zhi/"+str1[i]+".png'>"
							}
							document.write(str+"<input class='hidden' id='temp1'  />");
						</script>
					</div>
				</c:otherwise>
			</c:choose>
		</div>
		<div class="col-xs-12 col-sm-4 col-sm-offset-4 history" style="padding: 5px;">
			<hr>
			${dataList }
		</div>
		<div class="zdsd hidden" style='position: fixed;top:0;left:0;width: 100%;height: 100%;z-index: 60;background:black; filter:alpha(opacity:50);-moz-opacity:0.50;opacity:0.50;'>
		</div>
		<div class="zdsd hidden" style='position: fixed;left:0;z-index: 100;color: gray;padding: 20px;text-align: left;background: white;height: 290px;width: 90%;margin:5% ;bottom: 50px;border-radius:20px;border: 1px solid gray; '>
			<ul style="width: 100%;">
				<li style="text-align: center;height: 50px;">
					<strong style="font-size: 30px;color: black;">注 单 设 定</strong>
				</li>
				<li style="height: 15px;line-height: 15px;">
					<span style="float: left;">最高赔率：<span id="maxpl">${lotter.rebate1 }</span></span>
					<span style="float: right;">返利：<span id="fanli">0.0</span>%</span>
				</li>
				<li style="line-height: 20px;">
					<br><span id="id" class="hidden"></span>
					<input type="range" id="range" class="bbbbb" min="0" max="100" value="0" style="color: red;"  />
					<br>
					<span>单注金额：</span><input id="danzhu" class="bbbbb" value="${user.betacount }" style="border:1px white solid;border-bottom:1px solid gray; width: 60px;text-align: center;" />元
					<span>注数：<span id="zhusu"></span>注</span><br>
					<span>总额：<span id="heji"></span>元</span><br>
					<span>若中奖，最高中：<span id="makzj" style="color:red;"></span>元</span>
					<hr>
				</li>
				<li style="text-align: center;height: 15px;">
					<a class="col-xs-6" style="border-right: 1px solid gray;" onclick="cancel()">取消</a>
					<a class="col-xs-6" style="color: blue;" onclick="submit()" >确定</a>
				</li>
			</ul>
		</div>
		<br>　<br>　
		<div id="foot" class="col-xs-12 col-sm-4 col-sm-offset-4 text-center" style="position: fixed;bottom: 0px;background: #3672C6;padding: 10px;">
			<a onclick="clear1()" class="btn fl" style="width: 25%;background: red;color:white;border:1px solid red;">清　空</a>
			<a onclick="comit()" class="btn fr queren" style="width: 73%;color:white;border:1px solid white;">确　　定</a>
		</div>
	</body>
	<script type="text/javascript">
		$(function(){
			$(".sz .td,.bz .td").click(function(){
				$(".queren").text("确　　定");
				if($(this).attr("class").indexOf("act")!=-1){
					$(this).removeClass("act");
					$(this).addClass("btn2");
				}else{
					$(this).removeClass("btn2");
					$(this).addClass("act");
				}
				var s="";
				for(var i=0;i<$(".sz,.bz").find(".td").length;i++){
					if($(".sz,.bz").find(".td").eq(i).attr("class").indexOf("act")!=-1)
					s+=$(".sz,.bz").find(".td").eq(i).attr("text")+","
				}
				$("#temp1").val(s)
			});
			$(".bx .btn2").click(function(){
				$(".queren").text("确　　定");
				if($(this).attr("class").indexOf("act")!=-1){
					$(this).removeClass("act");
				}else{
					$(this).addClass("act");
				}
				
				var s="";
				for(var i=0;i<$(".bx").find("button").length;i++){
					if($(".bx").find("button").eq(i).attr("class").indexOf("act")!=-1)
					s+=$(".bx").find("button").eq(i).text()+","
				}
				$("#temp1").val(s)
			});
			$(".th img,.rx img").click(function(){
				$(".queren").text("确　　定");
				if($(this).attr("class").indexOf("act")!=-1){
					$(this).removeClass("act");
				}else{
					$(this).addClass("act");
				}
				
				var s="";
				for(var i=0;i<$(this).parent().find("img").length;i++){
					if($(this).parent().find("img").eq(i).attr("class").indexOf("act")!=-1)
					s+=$(this).parent().find("img").eq(i).attr("text")+","
				}
				$("#temp1").val(s)
			});
			$("#range,#danzhu").bind('input propertychange', function() {
				jisuan();
		    });
			
			qiu();
		});
		
		
		var dd=window.setInterval(function(){
			var time1 = new Date().format("hh:mm:ss").split(":");
			time1=Number(time1[0]*60*60)+Number(time1[1]*60)+Number(time1[2]);
			var time=$(".lasttime").text().split(" ")[1].split(":");
			time=Number(time[0]*60*60)+Number(time[1]*60)+Number(time[2]);
			time=time+Number($(".timespace").text())-time1;
			time--;
			var hour=Math.floor(time/3600);
			var minute=Math.floor((time-hour*3600)/60);
			var second=time-hour*3600-minute*60;
			if(time<30){
				$("#fenpan").removeClass("hidden");
			}
			if(time<0){
				$("#djs").text("正在开奖…");
				getnewdata();
			}else{
				$("#djs").text(bu0(hour)+":"+bu0(minute)+":"+bu0(second));
			}
		},1000);
		
		$("body").append("<div id='fenpan' class='hidden' style='position: fixed;bottom:0px;width:100%;background:rgba(200,200,200,0.8);height:55px;line-height:55px;font-size:30px;text-align:center;color:white;'>已封盘</div>");
		
		
		function qiu(){
			var lotternumber=$(".lotternumber").text().split(",");
			var lotter="";
			for(var i=0;i<lotternumber.length-1;i++){
 				lotter+=fenli(lotternumber[i]);
			}
			$(".lotternumber").html(lotter);
		}
		
		function getnewdata(){
			ajax({
				url:'/lotter/getnewdata.do',
				type:'post',
				data:{key:$("#cname").text()},
				success:function(data){
					var json=eval('('+data+')');
					if($(".xiaqi").text()==json.data.period){
						$(".lotternumber").text(json.data.lotternumber);
						$(".xiaqi").text(Number(json.data.period)+1);
						$(".period").text(json.data.period);
						$(".lasttime").text(json.data.lottertime);
						$("#fenpan").addClass("hidden");
						qiu();
					}
				},
				error:function(){
					alert("发生未知错误");
				}
			});
		}
		window.onload=function () {
			
		    document.addEventListener('touchstart',function (event) {
		        if(event.touches.length>1){
		            event.preventDefault();
		        }
		    })
		    var lastTouchEnd=0;
		    document.addEventListener('touchend',function (event) {
		        var now=(new Date()).getTime();
		        if(now-lastTouchEnd<=300){
		            event.preventDefault();
		        }
		        lastTouchEnd=now;
		    },false)
		}	
	</script>
</html>
